/*
 * Copyright 2013 NJUT  qixiaobo. All rights reserved.
 */
package com.fujitsu.nanjing.tieba.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.fujitsu.nanjing.tieba.base.BaseService;
import com.fujitsu.nanjing.tieba.ibator.CoreAdminLog;
import com.fujitsu.nanjing.tieba.ibator.CoreAdminLogCriteria;
import com.fujitsu.nanjing.tieba.model.AdminLog;

/**
 * AdminLogService.java
 * 
 * @author Administrator
 */
@Transactional
@Service
public class AdminLogService
		extends
			BaseService<CoreAdminLog, CoreAdminLogCriteria> {
	@Resource
	private AdminLog adminLog;
	@Override
	public CoreAdminLog findById(String id) {
		return adminLog.selectByPrimaryKey(Integer.parseInt(id));
	}

	@Override
	public CoreAdminLog insert(CoreAdminLog t) {
		adminLog.insertSelective(t);
		return t;
	}

	@Override
	public void update(CoreAdminLog t) {
		adminLog.updateByPrimaryKeySelective(t);

	}

	@Override
	public void delete(CoreAdminLog t) {
		adminLog.deleteByPrimaryKey(t.getLogid());
	}
}
